package com.liu.springmvc.handler;

import org.springframework.core.MethodParameter;

import java.lang.reflect.Method;

/**
 * @author LIU
 * @version 1.0
 * @description TODO
 * @date 2024/1/23 15:11
 */
public class HandlerMethod {

    private Method method;

    private String url;

    private Object bean;

    private MethodParameter[] parameters = new MethodParameter[0];

    public MethodParameter[] getParameters() {
        return parameters;
    }

    public void setParameters(MethodParameter[] parameters) {
        this.parameters = parameters;
    }

    public Method getMethod() {
        return method;
    }

    public void setMethod(Method method) {
        this.method = method;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public Object getBean() {
        return bean;
    }

    public void setBean(Object bean) {
        this.bean = bean;
    }

    @Override
    public String toString() {
        return "RequestMappingInfo{" +
                "method=" + method +
                ", url='" + url + '\'' +
                ", bean=" + bean +
                '}';
    }
}
